import request from '../utils/request'

export const login=(account, password)=>{
  return request({
    url: "/user/login",
    method: 'post',
    data: {
      account: account,
      password: password
    }
  })
}

export const getNavMenu=()=>{
  return request({
    url: "/menu/getNavMenu",
    method: 'get',
  })
}

export const queryUserList= (current,size,userBO) => {
  return request({
    url: "/user/pageOfUser",
    method: 'post',
    params: {
      current,
      size
    },
    data: userBO
  })
}

export const changeUserStatus = (userBo) => {
  return request({
    url: "/user/changeUserStatus",
    method: "post",
    data: userBo
  })
}

export const addOrUpdateUser = (userBo) => {
  return request({
    url: '/userUpOrAdd',
    method: 'post',
    data: {
      userBo
    }
  })
}

export const queryUserInfo = (id) => {
  return request({
    url: "/user/queryUserById",
    method: "get",
    params: {
      id
    }
  })
}

export const multiDelUser = (idArray) => {
  return request({
    url: "/user/multiDelUser",
    method: "post",
    data: idArray
  })
}

export const multiChangeUsrStatus = (idStatus) => {
  return request({
    url: "/user/multiChangeUsrStatus",
    method: "post",
    data: idStatus
  })
}

